package org.com.controller;

import io.swagger.annotations.Api;
import org.com.common.R;
import org.com.service.CategoriesService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@Slf4j
@RestController
@Api(tags = "分类管理")
@RequestMapping("/api/categories")
public class CategoriesController {
    
    @Autowired
    private CategoriesService categoriesService;
    
    /**
     * 获取所有分类
     * @return 分类列表
     */
    @GetMapping("/list")
    public R getAllCategories() {
        log.info("获取所有分类");
        return categoriesService.getAllCategories();
    }
} 